package com.peas.platform.module.icims.base.dict.adapter.repository.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

// 数据字典值
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_dict_value`")
public class DictValuePo extends BasePo {

    // 数据字典类型ID
    // 【数据字典类型表】
    @Comment(value = "数据字典类型ID")
    @NotNull(message = "数据字典类型ID不能为空")
    @TableField(value = "`dict_type_id`", jdbcType = JdbcType.BIGINT)
    private Long dictTypeId;

    // 数据字典类型编码
    @Comment(value = "数据字典类型编码")
    @Size(max = 50, message = "数据字典类型编码不能超过50个字符")
    @TableField(value = "`dict_type`", jdbcType = JdbcType.VARCHAR)
    private String dictType;

    // 数据字典值
    @Comment(value = "数据字典值")
    @NotBlank(message = "数据字典值不能为空")
    @Size(max = 100, message = "数据字典值不能超过100个字符")
    @TableField(value = "`dict_key`", jdbcType = JdbcType.VARCHAR)
    private String dictKey;

    // 数据字典名称
    @Comment(value = "数据字典名称")
    @NotBlank(message = "数据字典名称不能为空")
    @Size(max = 200, message = "数据字典名称不能超过200个字符")
    @TableField(value = "`dict_value`", jdbcType = JdbcType.VARCHAR)
    private String dictValue;

    // 状态
    // 枚举取值:CommonEnableDisable
    @Comment(value = "状态", enumType = "CommonEnableDisable")
    @NotBlank(message = "状态不能为空")
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

    // 排序权重
    @Comment(value = "排序权重")
    @TableField(value = "`weight`", jdbcType = JdbcType.INTEGER)
    private Integer weight;

    // 标签类型
    // 枚举取值:CommonElType
    @Comment(value = "标签类型", enumType = "CommonElType")
    @Size(max = 100, message = "标签类型不能超过100个字符")
    @TableField(value = "`el_tag_type`", jdbcType = JdbcType.VARCHAR)
    private String elTagType;

    // 标签class
    @Comment(value = "标签class")
    @Size(max = 100, message = "标签class不能超过100个字符")
    @TableField(value = "`el_tag_class`", jdbcType = JdbcType.VARCHAR)
    private String elTagClass;

    // 标签样式
    @Comment(value = "标签样式")
    @Size(max = 100, message = "标签样式不能超过100个字符")
    @TableField(value = "`el_tag_style`", jdbcType = JdbcType.VARCHAR)
    private String elTagStyle;

}
